glx: Fake an X request to make GLX hack work
authorBenjamin Otte <otte@redhat.com>
Tue, 6 Jun 2023 03:13:39 +0000 (05:13 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 6 Jun 2023 03:20:34 +0000 (05:20 +0200)
commite580dcf18ddc6ce0aa1c503aff26043c5bc55ea1
tree0f9ed0572ab4dde208c5111f8af7d3e1796a34c3
parent14e44f36bfc9a9149e0411db9169416cb6769237
glx: Fake an X request to make GLX hack work

Sometimes, GLX can decide to use the previous request serial when faking
XErrors via __glXSendError() (look through the Mesa sources to enjoy).
This can cause the error trap we just installed to not feel responsible
for the error. And that makes GDK decide to immediately abort the
application.
That is not what we or GLX want.

So we use a no-op X Request to bump the request number so that when GLX
does its shenanigans, it uses a serial that our error trap will catch.

Fixes a crash in mutter's CI which apparently manages to drive GLX
without an X server.
gdk/x11/gdkglcontext-glx.c